function msg = f3d_simple(img)
    % F3D_SIMPLE  Extract message using F3.

    r = int16(im2vec(img, [8 8])');    
    [M,N] = size(r);
    bin = zeros(1,M*N);

    % get all LSB
    count = 1;
    for i=1:M
        for j=2:N
            if (r(i,j) ~= 0)
                bin(count) = mod(r(i,j),2);
                count = count + 1;
            end
        end
    end
    
    count = count - 1;
    
    % output
    msg = binaryToArray(bin, count);
    fprintf(1,'recovered message is: %s\n',msg);
end
